<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="page" uri="/WEB-INF/paging.tld"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+
            request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <base href="<%=basePath%>">
    <title>Title</title>
    <style type="text/css">
        td{border: solid 1px;}
    </style>
</head>
<body>

    <c:set var="buyer" value="${dto.t}" scope="request"/>
    ${buyer.buid}<br>
    ${buyer.buname}
    <hr>
    已支付关联订单<br/>
  <c:forEach items="${buyer.orderinfos}" var="orderinfo">
    ${orderinfo.orid}  ${orderinfo.ortime}

        <hr>
        <div>
      <c:forEach items="${orderinfo.orderdetails}" var="orderdetail">
          &nbsp;&nbsp;&nbsp;&nbsp;<span>商品：</span>  ${orderdetail.goods.gname}  ${orderdetail.goods.shop.shname}  ${orderdetail.grealprice}<br/>

      </c:forEach>
 </c:forEach>
        </div>
      <hr>
      <span>未支付订单</span>
      <c:forEach items="${buyer.unPayOrderinfos}" var="unPayOrderinfo">
          ${unPayOrderinfo.orid}  ${unPayOrderinfo.ortime}<a href="/orderinfo/pay/${unPayOrderinfo.orid}">支付</a>

          <hr>
          <div>
          <c:forEach items="${unPayOrderinfo.orderdetails}" var="orderdetail">
              &nbsp;&nbsp;&nbsp;&nbsp;<span>商品：</span>  ${orderdetail.goods.gname}  ${orderdetail.goods.shop.shname}  ${orderdetail.grealprice}<br/>

          </c:forEach>
      </c:forEach>

</body>
</html>